// 贴标工单状态格式化数据
const _labelWorkOrderStateData: Record<string, string> = {
  '0': '初始',
  '1': '计划移库',
  '3': '完成移库',
  '5': '已上线',
  '7': '已下线',
  '9': '已QA',
}
// 贴标工单状态格式化
export const labelWorkOrderState = function (value: string): string {
  return _labelWorkOrderStateData[value] ?? value
}

// adjState颜色
const _labelWorkOrderStateColor: Record<string, string> = {
  '0': 'info',
  '1': 'blue-6',
  '3': 'blue-6',
  '4': 'blue-6',
  '5': 'blue-6',
  '9': 'positive',
}

// adjState颜色格式化
export function labelWorkOrderStateColor(value: string | null) {
  if (value == null) {
    return null
  }
  return _labelWorkOrderStateColor[value] ?? value
}




// 空托盘转移任务状态
const _lpnTaskStateData: Record<string, string> = {
  '0': '初始',
  '5': '已下发',
  '9': '执行成功',
  'X': '执行失败'
}
export const lpnTaskState = function (value: string): string {
  return _lpnTaskStateData[value] ?? value
}
const _lpnTaskStateColor: Record<string, string> = {
  '0': 'info',
  '5': 'blue-6',
  '9': 'positive',
  'X': 'negative',
}
export function lpnTaskStateColor(value: string | null) {
  if (value == null) {
    return null
  }
  return _lpnTaskStateColor[value] ?? value
}
